package com.ts.api.module.api.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

/**
 *  API-返回协议实体对象
 *
 *  @author Pan
 */
@Data
public class ApiProtocol {

    /** 协议名称 */
    private String protocolName;
    /** 协议地址 */
    @JSONField(alternateNames = {"protocolNameUrl"})
    private String protocolUrl;

    /**
     *  构建协议对象
     *
     *  @param  protocolName
     *  @param  protocolUrl
     *  @return ApiProtocol
     */
    public static ApiProtocol of(String protocolName, String protocolUrl) {
        ApiProtocol apiProtocol = new ApiProtocol();
        apiProtocol.setProtocolName(protocolName);
        apiProtocol.setProtocolUrl(protocolUrl);
        return apiProtocol;
    }
}
